home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
utils
/
pbmbat12
/
readme
< prev
Wrap
Text File
|
1994-09-10
|
7KB
|
196 lines
PBMBAT 1.2 (September 10, 1994) -- README
***************************************************************
TABLE OF CONTENTS
(1) WHAT IS PBMPLUS?
(2) PROBLEM (A): HOW TO FIND THE RIGHT CONVERTER?
(3) PROBLEM (B): CREATING AND DELETING PROGRAMS
(4) THE PBMBAT PROGRAM
(5) WHAT'S NEW IN THIS VERSION?
***************************************************************
(1) WHAT IS PBMPLUS?
Here is an excerpt from the original README file for PBMPLUS.
***************************************************************
Extended Portable Bitmap Toolkit. Distribution of 10dec91.
Previous distribution 30oct91.
PBMPLUS is a toolkit for converting various image formats to
and from portable formats, and therefore to and from each
other. The idea is, if you want to convert among N image
formats, you only need 2*N conversion filters, instead of the
N^2 you would need if you wrote each one separately.
In addition to the converters, the package includes some
simple tools for manipulating the portable formats.
***************************************************************
(2) PROBLEM (A): HOW TO FIND THE RIGHT CONVERTER?
Here is an excerpt from the original README file for PBMPLUS.
***************************************************************
Some people get confused by all the different names. If you
want to convert a pbm file to a Sun raster file, is it
pbmtorast, pgmtorast, ppmtorast, or pnmtorast? In this case
some of the confusion might be because previous versions of
the package did in fact have both pbmtorast and ppmtorast.
But mostly it's just too many different things to hold in your
short term memory. Fine, so don't even try to remember what's
what. That's what computers are for.
***************************************************************
(3) PROBLEM (B): CREATING AND DELETING PROGRAMS
Here is an excerpt from the original README.DOS file for Mike
Castle's DOS port of PBMPLUS using the djgpp compiler
(gcc/g++).
***************************************************************
On unix systems, you can do what is called a 'link' to a file.
Essentially what this does is gives the same file different
names. When the file is an executable, the name returned by
argv[0] is what ever name you invoked it by. Some programs can
examine argv[0] and change their functionality as a result.
compress/uncompress/zcat does this. All three programs are
identical (and on many systems, the exact same file with
multiple links). Pbmplus uses this functionality to make
smaller 'merged' binaries. Instead of compiling each program
with main(), each program in compiled with filename_main(). A
dispatch program (the p?mmerge.c file) calls the appropriate
filename_main() based on what is in argv[0]. The result is you
get one binary, slightly bigger than any individual binaries,
but smaller than all of them put together becuase you are only
linking in one copy of fprintf(), one copy of fopen(), one
copy of ppm_readfile(), etc.
Now, since dos does not support links in its filesystem, you
have to result to copying to get the functionality of the
programs.
For example, if you want to take a 24-bit Targa file and
quantize it to an 8 bit gif file for viewing, you would do the
following:
copy ppmmerge.exe tgatoppm.exe
copy ppmmerge.exe ppmqvga.exe
copy ppmmerge.exe ppmtogif.exe
tgatoppm my.tga | ppmqvga | ppmtogif > my.gif
Of course, if you use a certain utility a lot, you keep that
one around. If you occasionally need a certain functionality,
you can copy the merged binary to the appropriate name, use
it, then delete it. If you want to keep the entire ppmplus
package on line, I would recommend building it yourself.
Takes about 4 megs to keep all the stubbed exe's around. What
I do is keep unmerged copies of the files I use all the time
and the p?mmerge files. When I occasionally come across
something I don't have, I can use the merged binary. You can
usually figure out which merged binary to use by the name of
the program you want. Any program that handles multiple p?m
types will be in the higher ranking of the merged binaries.
ie, pbmtopgm is in pgmmerge, pgmtoppm is in ppmmerge, etc
****************************************************************
(4) THE PBMBAT PROGRAM
****************************************************************
The PBMBAT program solves problems (A) and (B) for you by
creating exactly the batch files you want.
EXAMPLE 1.
You want to convert the GIF file "image.gif" into the GEM file
"image.img".
You type "pbmbat giftogem image.gif image.img > xx.bat"
This creates a batch file called xx.bat. Run this batch file
and delete it, and your job will be done. That's all!
IMPORTANT NOTE
I always use the batch file pbm.bat to make this process
even easier. Read pbm.bat in order to see what it does. Modify
it if necessary.
When you use pbm.bat, you can simply type
"pbm giftogem image.gif image.img"
EXAMPLE 2.
You want to make a pretty picture. Type:
call pbm ppmpat -squig 640 480 temp0
call pbm ppmquant 128 temp0 temp1
call pbm ppmtogif temp1 pretty.gif
del temp0
del temp1
(Or make a batch file which executes these commands for you.)
COMMAND SYNTAX:
USAGE: "pbmbat program [arguments] outputfile [>batchfile]"
INPUT: atk brush cmuwm fits fs g3 gem gif gould hips icon ilbm img lispm
macp mgr mtv pbm pcx pgm pi1 pi3 pict pj pnm ppm psid qrt rast raw
rgb3 sld spc spu tga xbm xim xpm xwd ybm yuv (N=41)
OUTPUT: 10x acad ascii atk bbnbg cmuwm epson fits fs g3 gem gif go icon
icr ilbm lispm lj macp mgr pbm pcx pgm pi1 pi3 pict pj plot pnm ppm ps
ptx puzz rast rgb3 sixel tga uil x10bm xbm xpm xwd ybm yuv zinc (N=45)
IMAGE GENERATORS: $crater $forge $make $pat $ramp $text $upc (N=7)
where $ is a string from OUTPUT
FILTERS: pbmlife pbmmask pbmreduce pgmbentley pgmedge pgmenhance pgmhist
pgmnorm pgmoil pgmtexture pnmarith pnmcat pnmcomp pnmconvol pnmcrop
pnmcut pnmdepth pnmenlarge pnmfile pnmflip pnmgamma pnminvert pnmnoraw
pnmpaste pnmrotate pnmscale pnmshear pnmtile ppmdither ppmhist
ppmquant ppmqvga ppmrelief (N=33)
EXAMPLES: pbmbat atkto10x pic.atk pic.10x
pbmbat giftext "<"text.txt text.gif
(Note the quotation marks around the redirection character!)
AUTHOR
(c) Gert-Jan C. Lokhorst,
lokhorst@filint.fwb.eur.nl,
All comments are very welcome!
****************************************************************
(5) WHAT'S NEW IN THIS VERSION?
****************************************************************
VERSION 1.2
You can now convert any file in any drive:directory into a
file in any other drive:directory from any drive:directory,
provided that the PBMPATH environment variable has been set.
pbm.bat shows how to do this.